/*
** MSGBOX.C: Takes action based on the user's response to
** a message box.
*/

#include <pictor.h>
#include <mouse.h>
#include <stdio.h>


COLORSTRUCT msgcolors = {
   foreback(BOLD+WHITE,RED),
   foreback(BOLD+YELLOW,RED),
   foreback(BLACK,WHITE),
   foreback(BOLD+WHITE,WHITE)
};

#define EVER ;;

void main()
{
	char buffer[255] = {'\0'};
	int status = 0;
	int mousex = 1, mousey = 1, currentmousebutton = 0, previousmousebutton = 0;
	
   /* initialize library */
   initvideo();
   
   /* Initialize mouse. */
   initmouse();
   showmouse();


   /* clear screen if user selects yes */
   if(messagebox("Do you want the screen cleared?",
      "Question",MB_YESNO,&msgcolors)) {

      vcolor(foreback(WHITE,BLACK));
      cls();
   }
   endmouse();
   //system("PAUSE");
}
